libxl: fix the cleanup of the backend path when using driver domains
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 23 Sep 2015 10:06:56 +0000 (12:06 +0200)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 24 Sep 2015 10:42:50 +0000 (11:42 +0100)
commit546678c6a60f64fb186640460dfa69a837c8fba5
treec53273d6f8f38d4a05ef3fefc59138235586bb8a
parent5c9a00c57172182652c432e80cc278bebc044dc4
libxl: fix the cleanup of the backend path when using driver domains

With the current libxl implementation the control domain will remove both
the frontend and the backend xenstore paths of a device that's handled by a
driver domain. This is incorrect, since the driver domain possibly needs to
access the backend path in order to perform the disconnection and cleanup of
the device.

Fix this by making sure the control domain only cleans the frontend path,
leaving the backend path to be cleaned by the driver domain. Note that if
the device is not handled by a driver domain the control domain will perform
the removal of both the frontend and the backend paths.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reported-by: Alex Velazquez <alex.j.velazquez@gmail.com>
Cc: Alex Velazquez <alex.j.velazquez@gmail.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_device.c